const scriptCode = 
`
(function(){
const clickSpine = () => {
  console.log('1233333')
}
})()

`
// "web_accessible_resources":[
//   { 
//   "resources": ["img/*","spine/*"],
//   "matches": ["<all_urls>"]
//   }
// ],
      // let o_spine_script_text = document.createTextNode(${scriptCode});
      // o_spine_script.setAttribute('src', 'http://www.aoinm.cn/ServerDoc/spine.js')
      // o_spine_script.appendChild(o_spine_script_text);
// chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
//   if (changeInfo.status == 'complete' && tab.active) {
//     chrome.tabs.executeScript(null,{code:`
//       let o_canvas_spine = document.createElement('canvas');
//       let o_spine_position = document.createElement('div');
//       let o_spine_script = document.createElement('script');
//       o_canvas_spine.setAttribute('id', 'o-canvas-spine');
//       o_canvas_spine.setAttribute('class', 'o-spine');
//       o_spine_position.setAttribute('id', 'o-spine-position');
//       o_spine_position.setAttribute('class', 'o-spine-position');
//       o_spine_position.setAttribute('onclick', 'clickSpine()');
//       o_spine_position.setAttribute('onmousedown', 'spinedrag()');
//       document.body.appendChild(o_canvas_spine);
//       document.body.appendChild(o_spine_position);
//       document.body.appendChild(o_spine_script);
//     `})
//   }
// })
